package com.wu.dao;


import com.wu.pojo.po.paperPo.Answer;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * description:
 * Author:wuzhengru
 * Date:2021/04/22
 */
@Mapper
@Component
public interface AnswerDao {

    List<Answer> queryAnswerByRemark(@Param("questionId") String questionId,@Param("remark") String remark);

     List<Answer> queryAnswer();

     List<Answer> queryAnswerByPaperId(String paperId);

     List<Answer> queryAnswerByQuestionId(String questionId);

     Answer queryAnswerById(String id);

     int insertAnswer(Answer answer);

     int updateAnswer(Answer answer);

     int deleteAnswer(String id);

     int countAnswer(@Param("paperId") String paperId, @Param("questionId") String questionId);

    int deleteAnswerByPaperId(String paperId);

    List<Answer> queryAnswerByPaperIdAndUserId(@Param("paperId") String paperId, @Param("userId") String userId);

    Answer queryAnswerByPaperIdAndUserIdAndQuestionId(@Param("paperId") String paperId,@Param("userId")String userId,@Param("questionId")String questionId);

}
